<%--
  Created by IntelliJ IDEA.
  User: user
  Date: 09.06.14
  Time: 13:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Tasks</title>
</head>
<body>


<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page isELIgnored="false" %>
<%@ page session="true" %>

<c:if test="${sessionScope.userAccess eq 1}">
    <a href="tasks/AddTasks.jsp"> Add Task</a>
    <a href="tasks/AddCurrentTask.jsp"> Add Current Task</a>
</c:if>
<jsp:useBean id="TaskBean" scope="session" class="bean.TasksBean">
    <jsp:setProperty name="TaskBean" property="access" value="${sessionScope.userAccess}"/>
    <jsp:setProperty name="TaskBean" property="tasks" value="true"/>

    <br>
    <table border="2">
    <c:forEach  var="list" items="${TaskBean.listTask}" >
            <tr>
                <td>
                    <c:out value="${list.id}"/>
                </td>
                <td>
                    <c:out value="${list.title}"/>
                </td>
                <td>
                    <c:out value="${list.description}"/>
                </td>
                <td>
                    <c:out value="${list.priorites}"/>
                </td>
                <td>
                    <c:out value="${list.dateCreate}"/>
                </td>
                <td>
                    <c:out value="${list.dateStart}"/>
                </td>
                <td>
                    <c:out value="${list.dateEnd}"/>
                </td>

            </tr>





    </c:forEach>
    </table>

</jsp:useBean>

</body>
</html>
